The Complete n8n
Self-Hosting Guide
Master workflow automation with Docker, VPS hosting, and unlimited integrations—from zero to deployment in minutes
Table of Contents
What is n8n?
n8n (pronounced “n-eight-n”) is an open-source workflow automation platform that connects your apps, services, and APIs without writing code. Think of it as the Swiss Army knife for integration—it’s what Zapier wishes it could be, but with superpowers you actually control.
How n8n Works: The Architecture
n8n Visual Workflow Architecture
Example: Lead Capture Workflow
Key Concepts: Breaking It Down
Why Self-Host n8n?
While n8n offers a cloud version, self-hosting transforms you from a “user” to an “owner” of your automation infrastructure. Here’s why thousands of companies choose this path:
Benefits of Self-Hosting
- Zero per-execution costs: Run unlimited workflows without monthly fees
- Complete data sovereignty: Sensitive data never leaves your infrastructure
- Custom nodes & extensions: Install community or private integrations
- Unlimited scalability: Scale horizontally with queue mode
- GDPR/HIPAA compliance: Meet strict regulatory requirements
- Full customization: Modify source code if needed
- Network isolation: Keep workflows in private VPCs
Self-Hosting Considerations
- Technical expertise required: Need Docker/server management skills
- Maintenance responsibility: Handle updates, backups, security
- Infrastructure costs: VPS/cloud hosting fees ($5-50/month)
- Setup complexity: Initial configuration takes 1-2 hours
- No managed support: Rely on community forums
- Security management: You’re responsible for SSL, firewall, etc.
Cost Comparison: Self-Hosted vs. Cloud
| Scenario | n8n Cloud | Self-Hosted (VPS) | Annual Savings |
|---|---|---|---|
| Small Team (10k executions/month) | €20/month | $5-10/month | ~$150/year |
| Growing Business (50k executions) | €50/month | $10-20/month | ~$400/year |
| Enterprise (200k+ executions) | €150+/month | $25-50/month | ~$1,500/year |
| High Volume (1M+ executions) | €500+/month | $50-100/month | ~$5,000/year |
Installing n8n with Docker on Your Laptop
Docker provides the cleanest, most reliable way to run n8n locally. This setup is perfect for development, testing, and learning before deploying to production.
Method 1: Quick Start (Single Command)
Launch n8n with Docker
Open your terminal and run this command:
# Run n8n with data persistence
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
n8nio/n8n
What this does:
-p 5678:5678maps port 5678 to your localhost-v ~/.n8n:/home/node/.n8npersists data to your home directory--rmautomatically cleans up when you stop the container
Access n8n
Open your browser and navigate to:
http://localhost:5678
You’ll see the n8n interface where you can create your first workflow immediately.
Method 2: Docker Compose (Recommended for Production-Like Setup)
Create Project Directory
mkdir n8n-local
cd n8n-local
Create docker-compose.yml
version: '3.8'
services:
n8n:
image: n8nio/n8n:latest
container_name: n8n
restart: unless-stopped
ports:
- "5678:5678"
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=changeme123
- N8N_HOST=localhost
- N8N_PORT=5678
- N8N_PROTOCOL=http
- WEBHOOK_URL=http://localhost:5678/
- GENERIC_TIMEZONE=America/New_York
volumes:
- ./n8n_data:/home/node/.n8n
volumes:
n8n_data:
Launch n8n
# Start n8n in detached mode
docker compose up -d
# Check logs
docker compose logs -f n8n
Common Docker Commands You’ll Need
# Stop n8n
docker compose down
# Update to latest version
docker compose pull
docker compose up -d
# View logs in real-time
docker compose logs -f n8n
# Backup your data
docker cp n8n:/home/node/.n8n ./backup-$(date +%Y%m%d)
# Access container shell
docker exec -it n8n /bin/sh
Self-Hosting n8n on Hostinger VPS
Hostinger makes production n8n deployment incredibly simple with pre-configured templates, Docker support, and VPS plans starting at just $4.99/month.
Why Hostinger for n8n?
VPS Sizing Guide for n8n
| Use Case | Recommended Plan | Specs | Monthly Cost |
|---|---|---|---|
| Testing & Learning | KVM 1 | 1 vCPU, 4GB RAM, 50GB SSD | $4.99 |
| Small Business | KVM 2 | 2 vCPU, 8GB RAM, 100GB SSD | $8.99 |
| Growing Company | KVM 4 | 4 vCPU, 16GB RAM, 200GB SSD | $16.99 |
| Enterprise / Queue Mode | KVM 8 | 8 vCPU, 32GB RAM, 400GB SSD | $29.99 |
Hostinger One-Click Deployment
Order Your VPS
Navigate to Hostinger’s VPS hosting page and select a plan. For most users, KVM 2 (2 vCPU, 8GB RAM) is the sweet spot.
Select n8n Template
During VPS setup:
- Choose Operating System: Ubuntu 24.04 with n8n
- Select your preferred datacenter location
- Set a strong root password
- Add SSH keys if you have them (recommended)
Access n8n
In hPanel (Hostinger’s control panel), navigate to your VPS and click “Manage App”. This opens n8n at your assigned URL. Create your admin account on first access.
automation.yourdomain.com
Best n8n Automation Use Cases
n8n excels at connecting disparate systems and automating repetitive workflows. Here are the most impactful use cases across industries:
1. Lead Management & Sales Automation
2. E-commerce Operations
3. IT Operations & DevOps
Real-World Success Stories
These companies prove n8n’s value at scale, from startups to enterprises handling millions of operations monthly.
Delivery Hero: 200 Hours Saved Monthly
Delivery Hero (Global Food Delivery)
The company automated a critical IT operations workflow that previously required constant manual monitoring and intervention. When server alerts fire, n8n automatically creates incident tickets, notifies on-call teams, runs diagnostic scripts, and updates status pages.
200 hours/month
“We have seen drastic efficiency improvements since we started using n8n. It’s incredibly powerful, but also simple to use.” – Director of Global IT Service Delivery
Musixmatch: 47 Days of Engineering Work Saved
Musixmatch (Music Lyrics Platform)
The world’s largest lyrics platform replaced custom integration scripts with n8n workflows, connecting their database, APIs, and third-party services. In just 4 months, they saved 47 days of engineering work that would have been spent building and maintaining custom code.
47 days saved
“With n8n, we invested in the future. We’ve been able to streamline daily tasks and are now so much more efficient.”
StepStone: 200+ Mission-Critical Workflows
StepStone (European Job Platform)
Running over 200 automated workflows for data integration, StepStone can connect new APIs and data sources in under 2 hours—a process that previously took days of development work.
25x faster
“We can speed up the integration of data sources 25X. It takes a maximum of two hours to connect up various APIs.”
Comprehensive Pros & Cons
Every tool has tradeoffs. Here’s an honest assessment based on thousands of user experiences and real-world deployments.
What Makes n8n Exceptional
- Open-source freedom: No vendor lock-in, modify source code, self-host anywhere
- Developer flexibility: Write JavaScript/Python code inline, use npm packages, connect to any API
- Cost-effective scaling: No per-task pricing—run millions of executions on flat infrastructure cost
- 400+ pre-built integrations: Major apps covered plus HTTP node for anything else
- Visual workflow builder: Drag-and-drop interface makes complex automation accessible
- Data sovereignty: Keep sensitive data on your infrastructure for compliance
- Active community: 55,000+ members, thousands of templates, responsive forums
- Enterprise scalability: Queue mode enables horizontal scaling for high-volume workloads
Genuine Challenges & Limitations
- Steeper learning curve: More complex than Zapier; requires understanding of APIs and logic
- Self-hosting burden: You manage updates, backups, security, monitoring, and infrastructure
- Smaller integration library: 400+ nodes vs. Zapier’s 8,600+ apps
- Documentation gaps: Advanced features may require community forum searches
- No managed support: Community-only support unless you pay for Enterprise
- Performance with large datasets: Workflows processing 100k+ rows can be slow
- Initial setup time: Takes 1-2 hours to properly configure production deployment
How n8n Compares to Alternatives
| Platform | Best For | Pricing Model | Key Differentiator |
|---|---|---|---|
| n8n | Developers, tech teams, high volume | Free (self-host) or execution-based | Open-source, unlimited customization |
| Zapier | Non-technical users, simple workflows | Per-task pricing ($20-$599/mo) | 8,600+ integrations, easiest to learn |
| Make | Visual workflow builders | Operation-based ($9-$299/mo) | Advanced visual logic, good pricing |
| Power Automate | Microsoft 365 organizations | Included with M365 or $15/user/mo | Deep Microsoft integration |
Known Limitations & Workarounds
Understanding limitations upfront prevents frustration. Here are common issues users encounter—and proven solutions.
1. API Rate Limiting
Issue: Hitting External Service Limits
Services like Instagram (200 calls/hour), Salesforce (1,000/day), or Twitter enforce strict rate limits that crash workflows.
Workaround: Request Pacing & Retry Logic
- Add Wait nodes to throttle requests: spread 1,000 calls over hours instead of minutes
- Implement exponential backoff: retry after 1s, 2s, 4s, 8s on rate limit errors
- Use n8n’s built-in retry settings in node configurations
- Monitor API usage with separate workflows that check limits
2. Limited Integrations vs. Competitors
Issue: Missing Pre-Built Nodes
n8n has 400+ integrations vs. Zapier’s 8,600+. Your specific SaaS tool might lack a native node.
Workaround: HTTP Request Node + API Documentation
The HTTP Request node can connect to any API. Most modern apps have REST APIs with documentation. You can also use GraphQL, SOAP, and custom authentication.
Getting Started: Your First Workflow
Let’s create a practical “Lead Capture to CRM” workflow that demonstrates core n8n concepts.
Workflow Overview
Create Webhook Trigger
In n8n, click “New Workflow” Add “Webhook” node. Set Method to POST and copy the Production URL.
Add Email Validation
Add “Code” node with JavaScript to validate email format.
Connect Google Sheets
Add “Google Sheets” node, connect your account, select spreadsheet, and map fields.
Add Slack Notification
Add a “Slack” node, connect it after Google Sheets. Authentication is easy—just click “Connect Account” and authorize the n8n bot to post in your chosen channel.
Test & Activate
Click “Test Workflow” to verify everything works, then toggle “Active” to run 24/7!
Ready to Automate Everything?
You now have everything needed to deploy production-ready n8n automation—from local Docker setup to enterprise-grade VPS hosting with monitoring and backups.
Quick Reference Checklist
Before You Start
- ☑ Identify one high-value workflow to automate
- ☑ Choose hosting: local (testing) or VPS (production)
- ☑ Register domain for SSL (optional but recommended)
During Setup
- ☑ Use Docker/Docker Compose installation
- ☑ Enable PostgreSQL for production reliability
- ☑ Configure SSL with Let’s Encrypt
After Deployment
- ☑ Set up automated backups (daily recommended)
- ☑ Configure uptime monitoring
- ☑ Enable strong authentication
- ☑ Document your workflows for team handoffs

